#ifndef  MAJOR_PROB_H_
#define  MAJOR_PROB_H_
#include <iostream>

//=============================================
//Class: major_prob
//       This Class triple attributions structure
//       <major_id, probability, label>
//       It is a light weight structure of the instance
//       and an additional attibution which means the probability
//       we calculate.
//Author:Junix <unix_jun@yahoo.com.cn>
//=============================================

struct major_prob
{

    major_prob ()
    {
        _major = 0;
        _prob = 0;
        _label = "";
    }

    major_prob (float m, float p, string l)
    {
        _major = m;
        _prob = p;
        _label = l;
    }

    major_prob (const major_prob& mp)
    {
        _major = mp._major;
        _prob = mp._prob;
        _label = mp._label;
    }

    friend ostream & operator<< (ostream & os, const major_prob & mp)
    {
       // os << mp._major << "  " <<mp._label<<"  "<< mp._prob << std::endl;
        os << mp._major <<endl;
        return os;
    }

    float _major;
    float _prob;
    string _label;
};

#endif
